Skip to content

Conversation

@Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Jan 13, 2026

Description

This PR adds error prone to the build. All issues identified by it have been addressed.

Issue were identified at compile time : mvn clean compile

temporarily added the following change in pom.xml

diff --git a/pom.xml b/pom.xml
index 6985108302d..fc31667b963 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,6 +80,7 @@
         <cs.surefire-plugin.version>2.22.2</cs.surefire-plugin.version>
         <cs.clover-maven-plugin.version>4.4.1</cs.clover-maven-plugin.version>
         <cs.exec-maven-plugin.version>3.2.0</cs.exec-maven-plugin.version>
+        <cs.errorprone.version>2.24.1</cs.errorprone.version>
 
         <!-- Logging versions -->
         <cs.log4j.version>2.19.0</cs.log4j.version>
@@ -1094,15 +1095,25 @@
                     <configuration>
                         <source>${cs.jdk.version}</source>
                         <target>${cs.jdk.version}</target>
-                        <fork>true</fork>
-                        <meminitial>128m</meminitial>
-                        <maxmem>512m</maxmem>
+                        <encoding>UTF-8</encoding>
                         <compilerArgs>
                             <arg>-XDignore.symbol.file=true</arg>
                             <arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
                             <arg>--add-exports=java.base/sun.security.x509=ALL-UNNAMED</arg>
                             <arg>--add-exports=java.base/sun.security.provider=ALL-UNNAMED</arg>
+                            <arg>-XDcompilePolicy=simple</arg>
+                            <arg>-Xplugin:ErrorProne</arg>
                         </compilerArgs>
+                        <annotationProcessorPaths>
+                            <path>
+                                <groupId>com.google.errorprone</groupId>
+                                <artifactId>error_prone_core</artifactId>
+                                <version>${cs.errorprone.version}</version>
+                            </path>
+                        </annotationProcessorPaths>
+                        <fork>true</fork>
+                        <meminitial>128m</meminitial>
+                        <maxmem>512m</maxmem>
                     </configuration>
                 </plugin>

The project built successfully:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache CloudStack 4.20.3.0-SNAPSHOT:
[INFO] 
[INFO] Apache CloudStack Developer Tools - Checkstyle Configuration SUCCESS [  0.750 s]
[INFO] Apache CloudStack .................................. SUCCESS [  1.070 s]
[INFO] Apache CloudStack Framework - Managed Context ...... SUCCESS [  7.169 s]
[INFO] Apache CloudStack Framework ........................ SUCCESS [  0.049 s]
[INFO] Apache CloudStack Framework - Certificate Authority  SUCCESS [  2.142 s]
[INFO] Apache CloudStack Utils ............................ SUCCESS [01:18 min]
[INFO] Apache CloudStack Framework - Database ............. SUCCESS [ 40.067 s]
[INFO] Apache CloudStack Framework - Configuration ........ SUCCESS [01:22 min]
[INFO] Apache CloudStack Framework - Direct Download to Primary Storage SUCCESS [  3.188 s]
[INFO] Apache CloudStack API .............................. SUCCESS [ 55.936 s]
[INFO] Apache CloudStack Framework - REST ................. SUCCESS [  6.750 s]
[INFO] Apache CloudStack Framework - IPC .................. SUCCESS [ 13.312 s]
[INFO] Apache CloudStack Cloud Engine ..................... SUCCESS [  0.239 s]
[INFO] Apache CloudStack Cloud Engine API ................. SUCCESS [ 15.063 s]
[INFO] Apache CloudStack Cloud Engine Schema Component .... SUCCESS [01:23 min]
[INFO] Apache CloudStack Framework - Security ............. SUCCESS [  9.202 s]
[INFO] Apache CloudStack Core ............................. SUCCESS [ 58.367 s]
[INFO] Apache CloudStack Agents ........................... SUCCESS [ 32.017 s]
[INFO] Apache CloudStack Framework - Clustering ........... SUCCESS [ 17.557 s]
[INFO] Apache CloudStack Framework - Event Notification ... SUCCESS [ 16.567 s]
[INFO] Apache CloudStack Framework - Jobs ................. SUCCESS [ 34.621 s]
[INFO] Apache CloudStack Cloud Engine Internal Components API SUCCESS [ 17.115 s]
[INFO] Apache CloudStack Agent Management Servers Load Balancer SUCCESS [  3.912 s]
[INFO] Apache CloudStack Framework - Storage Config Drive Component SUCCESS [ 19.178 s]
[INFO] Apache CloudStack Server ........................... SUCCESS [05:06 min]
[INFO] Apache CloudStack Framework - Quota ................ SUCCESS [ 46.915 s]
[INFO] Apache CloudStack Usage Server ..................... SUCCESS [ 30.000 s]
[INFO] Apache CloudStack Cloud Services ................... SUCCESS [  0.045 s]
[INFO] Apache CloudStack Secondary Storage ................ SUCCESS [  0.125 s]
[INFO] Apache CloudStack Secondary Storage Service ........ SUCCESS [ 22.895 s]
[INFO] Apache CloudStack Engine Storage Component ......... SUCCESS [ 26.470 s]
[INFO] Apache CloudStack Engine Storage Object Component .. SUCCESS [ 12.976 s]
[INFO] Apache CloudStack Plugin POM ....................... SUCCESS [  0.925 s]
[INFO] Apache CloudStack Plugin - Safe Shutdown ........... SUCCESS [ 10.803 s]
[INFO] Apache CloudStack Cloud Engine Orchestration Component SUCCESS [ 45.128 s]
[INFO] Apache CloudStack Cloud Engine Service ............. SUCCESS [  2.950 s]
[INFO] Apache CloudStack Engine Storage Cache Component ... SUCCESS [  4.135 s]
[INFO] Apache CloudStack Engine Storage Image Component ... SUCCESS [ 17.659 s]
[INFO] Apache CloudStack Engine Storage Volume Component .. SUCCESS [ 31.929 s]
[INFO] Apache CloudStack Engine Storage Data Motion Component SUCCESS [ 23.308 s]
[INFO] Apache CloudStack Plugin - Storage Volume Dell-EMC ScaleIO/PowerFlex Provider SUCCESS [01:04 min]
[INFO] Apache CloudStack Engine Storage Snapshot Component  SUCCESS [ 47.263 s]
[INFO] Apache CloudStack Engine Userdata Component ........ SUCCESS [  9.514 s]
[INFO] Apache CloudStack Engine Cloud-Init Userdata Component SUCCESS [  8.003 s]
[INFO] Apache CloudStack Plugin - ACL Dynamic Role Based .. SUCCESS [ 12.921 s]
[INFO] Apache CloudStack Plugin - ACL Static Role Based ... SUCCESS [  5.157 s]
[INFO] Apache CloudStack Plugin - ACL Project Role Based .. SUCCESS [ 12.896 s]
[INFO] Apache CloudStack Plugin - Explicit Dedication Processor SUCCESS [  5.627 s]
[INFO] Apache CloudStack Plugin - Host Affinity Processor . SUCCESS [ 15.212 s]
[INFO] Apache CloudStack Plugin - Host Anti-Affinity Processor SUCCESS [  5.302 s]
[INFO] Apache CloudStack Plugin - Non-Strict Host Affinity Processor SUCCESS [ 15.006 s]
[INFO] Apache CloudStack Plugin - Non-Strict Host Anti-Affinity Processor SUCCESS [ 12.395 s]
[INFO] Apache CloudStack Plugin - SNMP Alerts ............. SUCCESS [ 11.666 s]
[INFO] Apache CloudStack Plugin - Syslog Alerts ........... SUCCESS [ 11.413 s]
[INFO] Apache CloudStack Plugin - API Discovery ........... SUCCESS [ 17.063 s]
[INFO] Apache CloudStack Plugin - API Rate Limit .......... SUCCESS [ 18.001 s]
[INFO] Apache CloudStack Plugin - Storage Volume default provider SUCCESS [ 17.468 s]
[INFO] Apache CloudStack Plugin - Storage Volume SolidFire Provider SUCCESS [ 13.662 s]
[INFO] Apache CloudStack Plugin - API SolidFire Integration Testing SUCCESS [  6.984 s]
[INFO] Apache CloudStack Plugin - Dummy Backup and Recovery Plugin SUCCESS [  5.681 s]
[INFO] Apache CloudStack Plugin - Open vSwitch ............ SUCCESS [  6.382 s]
[INFO] Apache CloudStack Plugin - Hypervisor KVM .......... SUCCESS [01:12 min]
[INFO] Apache CloudStack Plugin - EMC Networker Backup and Recovery Plugin SUCCESS [ 20.875 s]
[INFO] Apache CloudStack Plugin - KVM NAS Backup and Recovery Plugin SUCCESS [  4.959 s]
[INFO] Apache CloudStack Plugin - Inbuilt Root Certificate Authority SUCCESS [ 20.771 s]
[INFO] Apache CloudStack Plugin - Quota Service ........... SUCCESS [ 19.080 s]
[INFO] Apache CloudStack Plugin - Dedicated Resources ..... SUCCESS [ 22.674 s]
[INFO] Apache CloudStack Plugin - Implicit Dedication Planner SUCCESS [ 22.578 s]
[INFO] Apache CloudStack Plugin - User Concentrated Pod Deployment Planner SUCCESS [  6.055 s]
[INFO] Apache CloudStack Plugin - User Dispersing Deployment Planner SUCCESS [  4.938 s]
[INFO] Apache CloudStack Plugin - Cluster DRS Algorithm - Balanced SUCCESS [ 11.444 s]
[INFO] Apache CloudStack Plugin - Cluster DRS Algorithm - Condensed SUCCESS [ 14.544 s]
[INFO] Apache CloudStack Plugin - In Memory Event Bus ..... SUCCESS [ 13.886 s]
[INFO] Apache CloudStack Plugin - Kafka Event Bus ......... SUCCESS [  4.760 s]
[INFO] Apache CloudStack Plugin - RabbitMQ Event Bus ...... SUCCESS [  7.864 s]
[INFO] Apache CloudStack Plugin - Webhook Event Bus ....... SUCCESS [ 26.649 s]
[INFO] Apache CloudStack Plugin - Skip Heurestics Planner . SUCCESS [  5.432 s]
[INFO] Apache CloudStack Plugin - Host Allocator Random ... SUCCESS [ 16.506 s]
[INFO] Apache CloudStack Plugin - Hypervisor Baremetal .... SUCCESS [ 14.070 s]
[INFO] Apache CloudStack Plugin - Hypervisor Hyper-V ...... SUCCESS [ 17.793 s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM3 .... SUCCESS [ 21.193 s]
[INFO] Apache CloudStack Plugin - Hypervisor OracleVM ..... SUCCESS [  9.164 s]
[INFO] Apache CloudStack Plugin - Hypervisor UCS .......... SUCCESS [  5.962 s]
[INFO] Apache CloudStack Plugin - Hypervisor XenServer .... SUCCESS [ 43.368 s]
[INFO] Apache CloudStack Plugin - Cloudian Connector ...... SUCCESS [ 28.295 s]
[INFO] Apache CloudStack Plugin - Prometheus Exporter ..... SUCCESS [ 10.946 s]
[INFO] Apache CloudStack Plugin - Kubernetes Service ...... SUCCESS [ 39.741 s]
[INFO] Apache CloudStack Plugin - Metrics ................. SUCCESS [ 25.428 s]
[INFO] Apache CloudStack Plugin - BigSwitch Virtual Network Segment SUCCESS [ 31.003 s]
[INFO] Apache CloudStack Plugin - Dns Notifier Example .... SUCCESS [  5.413 s]
[INFO] Apache CloudStack Plugin - Network Elastic Load Balancer SUCCESS [ 24.215 s]
[INFO] Apache CloudStack Plugin - GloboDNS ................ SUCCESS [ 27.144 s]
[INFO] Apache CloudStack Plugin - Network Internal Load Balancer SUCCESS [ 27.353 s]
[INFO] Apache CloudStack Plugin - Network Netscaler ....... SUCCESS [ 10.478 s]
[INFO] Apache CloudStack Plugin - Network Nicira NVP ...... SUCCESS [ 30.007 s]
[INFO] Apache CloudStack Plugin - Network Opendaylight .... SUCCESS [ 15.272 s]
[INFO] Apache CloudStack Plugin - Palo Alto ............... SUCCESS [ 17.967 s]
[INFO] Apache CloudStack Plugin - Stratosphere SSP ........ SUCCESS [ 15.322 s]
[INFO] Apache CloudStack Plugin - Network Brocade VCS ..... SUCCESS [ 24.364 s]
[INFO] Apache CloudStack Plugin - Network VXLAN ........... SUCCESS [ 16.824 s]
[INFO] Apache CloudStack Plugin - Power Management Driver ipmitool SUCCESS [ 10.607 s]
[INFO] Apache CloudStack Plugin - Power Management Driver nested-cloudstack SUCCESS [  9.715 s]
[INFO] Apache CloudStack Plugin - Power Management Driver Redfish SUCCESS [  4.233 s]
[INFO] Apache CloudStack Plugin - StorageVm shared filesystem provider SUCCESS [ 17.010 s]
[INFO] Apache CloudStack Plugin - Storage Image default provider SUCCESS [  6.080 s]
[INFO] Apache CloudStack Plugin - Storage Image S3 provider SUCCESS [  4.862 s]
[INFO] Apache CloudStack Plugin - Storage Image sample provider SUCCESS [  4.744 s]
[INFO] Apache CloudStack Plugin - Storage Image Swift provider SUCCESS [  4.863 s]
[INFO] Apache CloudStack Plugin - Storage Volume CloudByte Provider SUCCESS [  9.453 s]
[INFO] Apache CloudStack Plugin - Storage Volume Datera Provider SUCCESS [  9.526 s]
[INFO] Apache CloudStack Plugin - Storage Volume Nexenta Provider SUCCESS [ 10.267 s]
[INFO] Apache CloudStack Plugin - Storage Volume sample provider SUCCESS [  3.384 s]
[INFO] Apache CloudStack Plugin - Storage Volume Linstor provider SUCCESS [ 19.708 s]
[INFO] Apache CloudStack Plugin - Storage Volume StorPool provider SUCCESS [ 37.694 s]
[INFO] Apache CloudStack Plugin - Storage Volume Adaptive Base Provider SUCCESS [  9.327 s]
[INFO] Apache CloudStack Plugin - Storage Volume - Pure Flash Array SUCCESS [  7.305 s]
[INFO] Apache CloudStack Plugin - Storage Volume - HPE Primera SUCCESS [  9.449 s]
[INFO] Apache CloudStack Plugin - MinIO object storage provider SUCCESS [ 15.614 s]
[INFO] Apache CloudStack Plugin - Ceph RGW object storage provider SUCCESS [ 14.914 s]
[INFO] Apache CloudStack Plugin - Simulator object storage provider SUCCESS [ 11.638 s]
[INFO] Apache CloudStack Plugin - Storage Allocator Random  SUCCESS [  4.166 s]
[INFO] Apache CloudStack Plugin - User Authenticator LDAP . SUCCESS [ 41.483 s]
[INFO] Apache CloudStack Plugin - User Authenticator MD5 .. SUCCESS [ 13.775 s]
[INFO] Apache CloudStack Plugin - User Authenticator OAuth2 SUCCESS [ 25.426 s]
[INFO] Apache CloudStack Plugin - User Authenticator PBKDF2-SHA-256 SUCCESS [ 12.521 s]
[INFO] Apache CloudStack Plugin - User Authenticator Plain Text SUCCESS [  5.190 s]
[INFO] Apache CloudStack Plugin - User Authenticator SAML2  SUCCESS [ 45.961 s]
[INFO] Apache CloudStack Plugin - User Authenticator SHA256 Salted SUCCESS [ 10.469 s]
[INFO] Apache CloudStack Plugin - User Two Factor Authenticator TOTP SUCCESS [  3.784 s]
[INFO] Apache CloudStack Plugin - User Two Factor Authenticator Static Pin SUCCESS [  6.261 s]
[INFO] Apache CloudStack VMware Base ...................... SUCCESS [ 44.670 s]
[INFO] Apache CloudStack Plugin - Hypervisor VMware ....... SUCCESS [ 56.216 s]
[INFO] Apache CloudStack Plugin - API VMware SIOC ......... SUCCESS [  5.233 s]
[INFO] Apache CloudStack Plugin - Veeam Backup and Recovery Plugin SUCCESS [ 27.919 s]
[INFO] Apache CloudStack Plugin - Cisco VNMC .............. SUCCESS [ 19.802 s]
[INFO] Apache CloudStack Plugin - NSX Network ............. SUCCESS [ 27.366 s]
[INFO] Apache CloudStack Framework - Spring Life Cycle .... SUCCESS [  3.095 s]
[INFO] Apache CloudStack Plugin - Network Juniper Contrail  SUCCESS [ 40.283 s]
[INFO] Apache CloudStack Plugin - Tungsten-Fabric Network . SUCCESS [01:07 min]
[INFO] Apache CloudStack Plugin - MySQL HA Strategy ....... SUCCESS [  4.555 s]
[INFO] Apache CloudStack Framework - Spring Module ........ SUCCESS [ 28.517 s]
[INFO] Apache CloudStack Secondary Storage Controller ..... SUCCESS [ 19.936 s]
[INFO] Apache CloudStack Console Proxy .................... SUCCESS [  0.134 s]
[INFO] Apache CloudStack Console Proxy - RDP Client ....... SUCCESS [ 34.906 s]
[INFO] Apache CloudStack Console Proxy - Server ........... SUCCESS [ 19.431 s]
[INFO] Apache CloudStack System VM ........................ SUCCESS [ 17.007 s]
[INFO] Apache CloudStack Client UI ........................ SUCCESS [ 56.302 s]
[INFO] Apache CloudStack Framework - QuickCloud ........... SUCCESS [  0.743 s]
[INFO] Apache CloudStack Test ............................. SUCCESS [  0.771 s]
[INFO] Apache CloudStack Developer Mode ................... SUCCESS [  0.600 s]
[INFO] Apache CloudStack Developer Tools .................. SUCCESS [  0.050 s]
[INFO] Apache CloudStack apidocs .......................... SUCCESS [ 24.704 s]
[INFO] Apache CloudStack marvin ........................... SUCCESS [  4.592 s]
[INFO] Apache CloudStack DevCloud4 ........................ SUCCESS [  0.983 s]
[INFO] Apache CloudStack DevCloud-KVM ..................... SUCCESS [  0.545 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  31:54 min (Wall Clock)
[INFO] Finished at: 2026-01-14T11:21:02-05:00
[INFO] ------------------------------------------------------------------------

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 21.42857% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.25%. Comparing base (6a324da) to head (f9ca9be).
⚠️ Report is 1 commits behind head on 4.20.

Files with missing lines Patch % Lines
...pervisor/kvm/storage/MultipathSCSIAdapterBase.java 0.00% 6 Missing ⚠️
...k/storage/datastore/util/NexentaStorAppliance.java 0.00% 6 Missing ⚠️
...rver/src/main/java/com/cloud/api/doc/Argument.java 0.00% 5 Missing ⚠️
...ava/com/cloud/upgrade/dao/Upgrade41500to41510.java 0.00% 4 Missing ⚠️
...ache/cloudstack/network/RoutedIpv4ManagerImpl.java 0.00% 4 Missing ⚠️
...oud/hypervisor/vmware/mo/HypervisorHostHelper.java 0.00% 4 Missing ⚠️
...ain/java/com/cloud/agent/manager/AgentAttache.java 0.00% 3 Missing ⚠️
...va/com/cloud/agent/manager/DirectAgentAttache.java 0.00% 3 Missing ⚠️
...ud/hypervisor/kvm/storage/KVMStorageProcessor.java 0.00% 2 Missing ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 2 Missing ⚠️
... and 26 more
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12419      +/-   ##
============================================
+ Coverage     16.23%   16.25%   +0.01%     
- Complexity    13382    13390       +8     
============================================
  Files          5657     5657              
  Lines        498999   499060      +61     
  Branches      60566    60613      +47     
============================================
+ Hits          81035    81112      +77     
+ Misses       408928   408904      -24     
- Partials       9036     9044       +8     
Flag Coverage Δ
uitests 4.03% <ø> (ø)
unittests 17.10% <21.42%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Google Error Prone into the build system to perform compile-time static analysis. Error Prone has identified and the PR fixes multiple categories of issues including:

  • Bugs where methods were called but results were ignored
  • Incorrect primitive comparisons that should use .equals()
  • Malformed logging statements with wrong placeholders
  • Dead code and redundant operations
  • Missing hashCode() implementations when equals() is overridden

Changes:

  • Added Error Prone (version 2.24.1) to the Maven compiler plugin configuration
  • Fixed 35+ Error Prone violations across multiple modules including server, engine, plugins, and core components
  • Applied @SuppressWarnings("BanJNDI") annotations to LDAP-related code where JNDI usage is intentional

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pom.xml Added Error Prone plugin configuration to Maven compiler
ByteBuffer.java Fixed missing assignment of Arrays.copyOf result
ServerNtlmsspChallenge.java Fixed array concatenation in error message
GlobalLoadBalancingRulesServiceImpl.java Changed == to .equals() for Long comparison
RoutedIpv4ManagerImpl.java Fixed missing format placeholders in error messages
UserVmManagerImpl.java Fixed config key retrieval and enum comparison
VolumeApiServiceImpl.java Removed unnecessary String.format wrapper
ManagementServerImpl.java Changed == to .equals() for Long comparison
IpAddressManagerImpl.java Fixed missing throw keyword for exception
HighAvailabilityManagerImpl.java Fixed logging format with correct placeholders
ConfigurationManagerImpl.java Changed == to .equals() for Boolean comparison
TemplateJoinDaoImpl.java Used saturated cast to prevent overflow
Argument.java Improved Comparable implementation with proper typing
ApiXmlDocWriter.java Fixed class type checking logic
OpenLdapUserManagerImpl.java Fixed logging and added JNDI suppression
ADLdapUserManagerImpl.java Added JNDI suppression annotation
StorPoolDataMotionStrategy.java Removed unnecessary String.format wrapper
StorPoolPrimaryDataStoreDriver.java Changed == to .equals() for Long comparison
NexentaStorAppliance.java Added missing hashCode() implementations
RedfishWrapper.java Fixed incorrect format placeholder count
XenServerGuru.java Fixed typo and simplified Pair construction
MultipathSCSIAdapterBase.java Converted logging to use placeholders
KVMStorageProcessor.java Fixed missing throw keywords
LibvirtComputingResource.java Fixed logging format placeholders
HypervInvestigator.java Simplified boolean return expression
RootCAProvider.java Removed duplicate method call
OnwireClassRegistry.java Fixed self-assignment bug
DefaultEndPointSelector.java Modernized iterator removal pattern
ScaleIOVMSnapshotStrategy.java Changed == to .equals() for Long comparison
Upgrade41500to41510.java Replaced anonymous HashMap with Map.of()
DatabaseAccessObject.java Fixed logging format mismatch
SystemVmTemplateRegistration.java Replaced anonymous HashMap with Map.of()
NetworkOfferingVO.java Fixed incorrect hardcoded enum value
NetworkOrchestrator.java Removed duplicate condition check
VirtualMachineManagerImpl.java Fixed missing format placeholder
DirectAgentAttache.java Added missing hashCode() implementation
AgentAttache.java Added missing hashCode() implementation
DirectDownloadCommand.java Removed dead assignment
RequestWrapper.java Fixed incorrect .getClass() call
HAProxyConfigurator.java Removed unnecessary toString() call
AbstractConfigItemFacade.java Fixed incorrect .getClass() usage
UpdateBackupOfferingCmd.java Fixed incomplete error message
MockVmMgr.java Fixed modulo operation for bounded random

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

@Override
@SuppressWarnings("BanJNDI")
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @SuppressWarnings(\"BanJNDI\") annotation is being used to suppress Error Prone warnings about JNDI usage. While JNDI usage in LDAP operations is legitimate, ensure that all JNDI contexts are properly secured and validated to prevent LDAP injection attacks. Review the input validation in these methods (getUsersInGroup, getUserForDn, searchUser, searchUsers) to ensure user-controlled data is properly sanitized before being used in LDAP queries.

Copilot uses AI. Check for mistakes.
private static final String MICROSOFT_AD_MEMBERS_FILTER = "memberOf";

@Override
@SuppressWarnings("BanJNDI")
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @SuppressWarnings(\"BanJNDI\") annotation suppresses JNDI-related warnings. Ensure that the groupName parameter and any other user-controlled inputs are properly validated and sanitized before being used in LDAP queries to prevent LDAP injection vulnerabilities.

Copilot uses AI. Check for mistakes.
Comment on lines 259 to 260
public int hashCode() {
return 1;
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hashCode() implementation for LuParams returns a constant value of 1, which violates the hashCode contract. Since the equals() method considers all instances of LuParams to be equal (line 255), this constant hashCode is technically correct but indicates a potential design issue. If all instances are equal, consider whether this class should be used as a key in hash-based collections, or if the equality logic needs to be refined.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can address this one (@Pearl1594 ?)

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 16354

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@Pearl1594 Pearl1594 changed the title Error Prone integration - Added error prone to the build Fix issues reported by Errorprone static analysis tool Jan 14, 2026
@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16362

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.3% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants